package ${scheme.packageName}.entity;

import ${GenericEntity};
import com.framework.loippi.mybatis.ext.annotation.Column;
import com.framework.loippi.mybatis.ext.annotation.Table;

import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * Entity - ${scheme.moduleName}
 * 
 * @author ${scheme.author!'Loippi Team'}
 * @version ${current_version}
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "${table.name}")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties({ "handler","hibernateLazyInitializer" }) 
@ApiModel(value="${scheme.moduleName}",description="${scheme.moduleName}")
public class ${table.className} implements GenericEntity {

	private static final long serialVersionUID = 5081846432919091193L;

	<#list table.columns as column>
	/** ${column.comments} */
	<#if column.pk == 1>
	@Column(id = true, name = "${column.name}", updatable = false)
	<#else>
	@Column(name = "${column.name}"<#if column.edit == 0>, updatable = false</#if> <#if column.insert == 0>, insertable = false</#if>)
	</#if>
	@ApiModelProperty(value = "${column.comments}")
	private ${column.javaType} ${column.javaField};
	
	</#list>
}
